package cn.edu.zafu.bigdata.psy;

class Book {
    private String title;
    private String author;
    private double price;

    public Book(String title, String author, double price) {
        this.title = title;
        this.author = author;
        this.price = price;
    }

    public String toString() {
        return "Book[title=" + title + ", author=" + author + ", price=" + price + "]";
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }
}
public class Question3 {
    public static void main(String[] args) {

        Book book1 = new Book("Java Programming", "John Doe", 29.99);
        Book book2 = new Book("Python Programming", "one", 30);
        Book book3 = new Book("C++ Programming", "two", 40);

        System.out.println(book1);
        System.out.println(book2);
        System.out.println(book3);
    }
}
